<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<title>后台用户管理</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all">
	<style>
		.blogUser-con .layui-table-view {
			border: none;
		}
		
		.blogUser-con .layui-table-box {
			margin-top: 10px;
		}
		
		.blogUser-con {
			padding: 0 15px 15px 15px;
			margin-bottom:50px;
		}
		.blogUser-con  .layui-table-tool-self{
			display:none;
		}
		.blogUser-con .not_border_left {
			border-left: none !important;
		}
		
		.blogUser-con .blogUser dl dd.layui-this {
			background-color: #1E9FFF !important;
		}
		
		.blogUser-con .hide {
			display: none;
		}
		
		.blogUser-con .show {
			display: block;
		}
		
		.blogUser-con .btn_size {
			height: 28px !important;
			line-height: 28px !important;
		}
		
		.blogUser-con .layui-table-body table tbody .layui-table-hover {
			background: #fffdd3 !important;
		}
		
		.blogUser-con .layui-table-body table tbody .layui-table-click {
			background: #fdef9b !important;
		}
		
		.blogUser-con .layui-table, .layui-table-view {
			border: none;
			margin-top: 0;
		}
		
		#add-AdminUser {
			display: none;
			z-index: 999 !important;
		}
		
		#add-AdminUser .artTypeLayer {
			width: 90%;
			margin-left: auto;
			margin-right: auto;
			padding-top: 20px;
		}
		.adminuserdetail{
			padding:20px;
			display: none;
		}
		.adminuserdetail table tr td{
			padding: 15px;text-align: center;
		}
		.adminuserdetail .tdbck{
			background: #f2f2f2;
			width: 30%;
		}
	</style>
</head>
<body>
	<div id="main" style="width: 1200px;height:500px;"></div> 
	  
	<script src="../../js/jquery-3.3.1.js" charset="utf-8"></script>
	<script src="../../layui/layui.js" charset="utf-8"></script>
	<script src="../../js/loadselect.js" charset="utf-8"></script>
	<script src="../../js/echarts.min.js"></script>
	<script type="text/javascript">
layui.use([ 'table', 'form', 'layer', 'laydate', 'laytpl', 'element' ], function() {
		var table = layui.table, form = layui.form, 
			layer = layui.layer, $ = layui.jquery,
			laydate = layui.laydate, laytpl = layui.laytpl,
			element = layui.element;
						
			//基于准备好的dom，初始化echarts实例 
			var myChart = echarts.init(document.getElementById('main'));
			// 显示标题，图例和空的坐标轴
			option = {
			    title: {
			        text: '学院积分统计',
			        subtext: '积分统计'
			    },
			    tooltip: {},
			    legend: {
			        data:["积分"]
			    },
			    toolbox:
			    {
			        show:true,
			        feature:
			        {
			            dataView:{show: true, readOnly: false},
			            magicType : {show: true, type: ['line', 'bar']},
			            restore : {show: true},
			            saveAsImage : {show: true}
			        }
			    },
			    xAxis: {
			        type:"category",
			        data: [],
			        axisLabel : {//坐标轴刻度标签的相关设置。
			                interval:0,
			                rotate:"45"
			            }
			    },
			    yAxis: [{
			        type:"value",
			    }],
			    series: [
			        {  
			            name:"积分",  
			            type:"bar",  
			            data:[]
			        }
			    ]
			};
			myChart.showLoading(); //loading动画
			
			
			$.ajax({
			    type : "post",
			    async : true,
			    url : "../../echarts/getecharts",
			    dataType:"json",
			    success:function(result) {
			        
			        if(result)
			        {
			           var obj = result;
			           myChart.hideLoading();
			             myChart.setOption({
			                 xAxis:{  
			                     data:obj.xAxisData
			                 },  
			                 series:obj.seriesList
			             });
			        }
			                  
			   },
			    error : function(errorMsg) {
			        //请求失败时执行该函数
			    alert("请求数据失败!");
			    myChart.hideLoading();
			    }
			});
			myChart.setOption(option);
			
			
			//点击事件
			myChart.on('click', function(params) {
			    console.log(params); 
				var name = params.name;
		
				sessionStorage.setItem('collegenameYXH',name);
				var collegename = sessionStorage.getItem('collegenameYXH');
				console.log(collegename);
				layer.open({
		               type: 2,
		               title: '专业积分统计',
		               shadeClose: true,
		               shade: 0.5,
		               closeBtn:'1',//右上角xx关闭
		               area: ['1000px','500px'],
		               content:'ProEcharts.jsp',
		               btn: ['确定', '取消'],
		               yes: function(index, layero){
				           //点击确认触发 iframe 内容中的按钮提交
				           var submit = layero.find('iframe').contents().find("#layuiadmin-app-form-submit");
				           submit.click();
			           },
		               success : function(layero, index){
				            var body = layui.layer.getChildFrame('body', index);
				            if(layEvent === 'edit'){
								var projectid = obj.data.projectid;
								sessionStorage.setItem('projectidxxYXH',projectid);
				                // 取到弹出层里的元素，并把编辑的内容放进去
				                body.find("#projectid").val(obj.data.projectid);  //将选中的数据的id传到编辑页面的隐藏域，便于根据ID修改数据
				                body.find("#arrangeid").val(obj.data.arrangeid);  //将选中的数据的id传到编辑页面的隐藏域，便于根据ID修改数据
				                // 记得重新渲染表单
		                		form.render();
				            }
				            setTimeout(function(){
				                layui.layer.tips('点击此处返回用户列表', '.layui-layer-setwin .layui-layer-close', {
				                    tips: 3
				                });
				            },100)
				        }
		              
	             });
			});
		});
			
</script>

</body>
</html>